﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.InteropServices;
namespace ClassLibraryMessageDataType
{

    [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public struct OneBatteryPointData
    {
        public byte boardcode;
        public byte positioncode;
        public byte status;
        public byte finishedreason;
        public ushort volate;
        public ushort current;
        public ushort capacity;
        public ushort timepriod;
        public ushort errorcode;
    }

    [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public struct OneBoardData
    {
        public byte boardcode;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 10)]
        public OneBatteryPointData[] oneboardBatpointdataArry;
    }


    public struct OneBoardData_for_json
    {
        public byte boardcode;
        // [MarshalAs(UnmanagedType.ByValArray, SizeConst = 10)]
        // public OneBatteryPointData[] oneboardBatpointdataArry;
        public List<OneBatteryPointData> oneboardBatpointdataArry;
    }

    [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public struct OneClientAll64BoardData
    {
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)]
        public OneBoardData[] all64boardBatpointdataAarry;
    }

    public struct OneClientAll64BoardData_for_json
    {
        // [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)]
        // public OneBoardData[] all64boardBatpointdataAarry;
        public List<OneBoardData_for_json> all64boardBatpointdataAarry;
    }
    class ClassOneClientAll640PointData
    {
    }
}
